# Author:sp
# CreaTime: $(DATE)
# FileName: $(NAME)
# Description: simple introdution of the code
s='hello,hello'
print(s.replace('hello','jack',1))
print(s.replace('hell','tom'))         #替换第三个参数不填，默认替换字符串中所i有的字符
print(s.replace('he','tom',3))
'''合并'''
lst=['hello','world','shell']
print(''.join(lst))
print(' '.join(lst))

t=('jack','tom','1123')
print(''.join(t))
print('*'.join('python'))

#t1=('j','k',123)       TypeError: sequence item 2: expected str instance, int found
#print(''.join(t1))     字符串的连接必须是同类型的

